    <div class="toppage">
    	<span class="left">
        	
        </span>
        <span class="btnadd">
        <a href="<?php echo action_link('update'); ?>" href="javascript:void(0)">Thêm mới khuyến mại</a>
        </span>
    </div>
    <div class="tableout">
    
    	<?php echo $this->message->display(); ?>
    	
    	<form method="post" action="<?php echo action_link('do_action'); ?>" id="action_form">

		<div class="title1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" type="checkbox"></div>
            <div class="column" style="width: 4%;">STT</div>
            <div class="column" style="width: 26%;">Tiêu đề</div>
            <div class="column" style="width: 30%;">Liên kết</div>
            <div class="column" style="width: 16%;">Ngày tạo</div>
            <div class="column" style="width: 8%;">Trạng thái</div>
        </div>
        
        <?php if(count($promotions) > 0): ?>
        <?php //$limit = $this->config->item('user', 'limit'); ?>
        <?php foreach($promotions as $i => $v): ?>
        <div class="linecate2">
        	<div class="column" style="width: 2%;"><input name="id[]" value="<?php echo $v->id; ?>" type="checkbox" /></div>
            <div class="column" style="width: 4%;"></div>
            
            <div id="row_<?php echo $v->id; ?>">
            
            <div class="column" style="width: 26%;" onmouseover="Hovercat('<?php echo $v->id; ?>')" onmouseout="Outcat('<?php echo $v->id; ?>')">
            	<a href="javascript:;" class="art"><?php echo $v->name; ?></a>
                <div class="action" id="neocat-<?php echo $v->id; ?>">
                    <img src="<?php echo img_link('edit.gif', 'admin'); ?>"><a href="<?php echo action_link('update/'.$v->id); ?>">Sửa</a><img src="<?php echo img_link('delete.gif', 'admin'); ?>"><a href="javascript:void(0)" onclick="user_delete('<?php echo $v->id; ?>')"><font color="#be0000">Xóa</font></a>
                </div>
            </div>
            <div class="column" style="width: 30%;">
            	<?php echo $v->url; ?>
            </div>
            <div class="column" style="width: 16%;"><font class="date"><?php echo date('d-m-Y', strtotime($v->created_date)); ?></font></div>
            
            <div class="column" style="width: 6%;">
            <?php if($v->status != 'yes'): ?>
			<a href="javascript:void(0);" onclick="user_status('<?php echo $v->id; ?>', 'active')"><img src="<?php echo img_link('pending.png', 'admin'); ?>" class="icon png" title="Kích hoạt" alt="Kích hoạt"></a>
            <?php else: ?>
			<a href="javascript:void(0);" onclick="user_status('<?php echo $v->id; ?>', 'suspend')"><img src="<?php echo img_link('active.png', 'admin'); ?>" class="icon png" title="Hủy kích hoạt" alt="Hủy kích hoạt"></a>
            <?php endif; ?>
            </div>
            
            </div>
        </div>
		<?php endforeach; ?>
		<?php endif; ?>

        <div class="bottom1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" value="" type="checkbox"></div>
            <div class="column" style="width: 50%;">
            	<select style="width: 130px;" id="action_name" name="action">
                    <option value="1">Chọn hành động</option>	                
	                <option value="active">Kích hoạt</option>
	                <option value="suspend">Hủy kích hoạt</option>
	                <option value="delete">Xóa</option>	                
                </select>
                <input value="Apply" class="btn" type="submit">
            </div>
            <span class="right1">
            	
                <div class="pagination">
                	
                    <ul>
                    <?php echo (isset($pagnav) ? $pagnav : ''); ?>
                    </ul>
                </div>
            </span>
        </div>
        
        </form>
        
    </div>

<script>
$('#action_form').iframer({
    onComplete: function(msg){
    	if(msg == 'yes') {
    		load_content('user_list', '<?php echo current_link(); ?>', true);
    	}
    	else show_error('div_message', msg)
    }
});
</script>